package com.mxpio.erp.common.plan.entity;

import com.mxpio.erp.common.jpa.model.NoticeLine;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PLAN_OD_REC_NOTICE_LINE")
@Schema(description="组织需求领料通知单行")
public class ODReceivingNoticeLine extends NoticeLine {

	private static final long serialVersionUID = 1L;

/*    @Schema(description = "组织需求单号")
    @Column(name = "ORGANIZATION_DEMAND_BIZ_NO_")
    private String organizationDemandBizNo;*/

    @Column(name = "ITEM_CODE_")
    @Schema(description = "物料编码")
    private String itemCode ;

    @Column(name = "ITEM_NAME_")
    @Schema(description = "物料名称")
    private String itemName ;

    @Column(name = "ITEM_SPEC_")
    @Schema(description = "规格型号")
    private String itemSpec ;

    @Column(name = "UNIT_CODE_")
    @Schema(description = "单位编号")
    @Dict(dicCode="ERP_TECH_UNIT_CODE")
    private String unitCode;

    @Column(name = "MAX_RECEIVING_")
    @Schema(description = "最大领料数")
    private BigDecimal maxReceiving;

    @Transient
    @Schema(description = "实际领料数")
    private BigDecimal actualReceiving;

    @Transient
    @Schema(description = "计划领料数")
    private BigDecimal planedReceiving;

    @Transient
    @Schema(description = "计划退货数")
    private BigDecimal planedReturns;


    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

    @Transient
    @Schema(description = "材料牌号")
    private String materialBrand;

    @Transient
    @Schema(description = "材料类型")
    @Dict(dicCode = "ERP_TECH_MATERIAL_TYPE")
    private String materialType;
}
